// 生成指定长度的数组数据
function generateArr (len) {
  let tmp = []
  for (let i = 1; i <= len; i++) {
    tmp.push(i)
  }
  return tmp
}

// 获取指定长度不重复的数据
function getNumber (len, arr) {
  let tmp = []
  while (tmp.length < len) {
    let num = arr[Math.floor(Math.random() * arr.length)]
    if (!tmp.includes(num)) {
      tmp.push(num)
    }
  }
  return tmp
}


// 遍历获取到的数组
function recursionArr (arr, obj, ) {

}

const arr35 = generateArr(35)
const arr12 = generateArr(12)
const obj5 = {}
const obj2 = {}

for (let i = 0; i < 100; i++) {
  let tmp5 = getNumber(5, arr35)
  let tmp2 = getNumber(2, arr12)
  tmp5.forEach(item => {
    if (obj5[item]) {
      obj5[item]++
    } else {
      obj5[item] = 1
    }
  })
  tmp2.forEach(item => {
    if (obj2[item]) {
      obj2[item]++
    } else {
      obj2[item] = 1
    }
  })
}
console.log(obj5, obj2)